from django.conf.urls import url
from . import views

# 子路由
urlpatterns = [
    url(r'^$',views.index,name='index'),
    url(r'^register$',views.register,name='uregister'),
    url(r'^login$',views.login,name='ulogin'),
    url(r'^loginout$',views.loginout,name='uloginout'),
    url(r'^list/(?P<id>[0-9]+)$', views.list, name='goodslist'),
    url(r'^info/(?P<id>[0-9]+)$', views.info, name='goodsinfo'),
    url(r'^cartadd$', views.cartadd, name='cartadd'),
    url(r'^cartlist$', views.cartlist, name='cartlist'),
    url(r'^cartclear$', views.cartclear, name='cartclear'),
    url(r'^cartupdate$', views.cartupdate, name='cartupdate'),
    url(r'^cartdel$', views.cartdel, name='cartdel'),

    # 订单
    url(r'^orderconfirm$', views.orderconfirm, name='orderconfirm'),
    # 生成订单
    url(r'^ordercreate$', views.ordercreate, name='ordercreate'),
    url(r'^orderbuy$', views.orderbuy,name='orderbuy'),
    url(r'^myorder$',views.myorder,name='myorder'),
    url(r'^myorder/orderdel/(?P<id>[0-9]+)$', views.orderdel, name='orderdel'),
    url(r'^member$',views.member,name='member'),

    # 地址
    url(r'^member/addadd$',views.addadd,name='addadd'),
    url(r'^member/addinsert$', views.addinsert, name='addinsert'),
    url(r'^member/addlist$',views.addlist,name='addlist'),
    url(r'^member/addedit/(?P<id>[0-9]+)$',views.addedit,name='addedit'),
    url(r'^member/addsave$', views.addsave, name='addsave'),
    url(r'^member/adddel/(?P<id>[0-9]+)$', views.adddel, name='adddel'),

]